﻿@{
    ViewBag.Title = "OrderConfirmation";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@using RBS.Core.Extension
@model  List<RBS.Core.Model.D_Order_Details>  
 <div class="tab-content" style=" padding: 10px;"> 
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
        <tr> 
            <th>菜名</th>
            <th>价格</th>
            <th>数量</th> 
            <th>操作</th> 
        </tr>
        @if (null != Model && Model != null && Model.Any())
        {
            foreach (var item in Model)
            {
                <tr> 
                    <td align="center">
                        @Html.DisplayFor(modelItem => item.CName)
                    </td>
                     <td  align="center">
                         @if (Convert.ToInt32(item.Price) == 0)
                        {
                              @Html.TextBox("Price",item.Price,new { @class = "input small", datatype = @"/^-?(([0-9]\d*)(\.\d{1,2})?)$|(0\.0?([1-9]\d?))$  /", errormsg = "填写单价！", sucmsg = " " })
                        }
                        else
                        {
                               @Html.DisplayFor(modelItem => item.Price)
                        }
                     
                    </td>
                    <td  align="center">
                        @if (Convert.ToInt32(item.Price) == 0)
                        {
                            @Html.TextBox("Num",item.Num, new { @class = "input small",datetype="n" })
                        }
                        else
                        {
                              @Html.DisplayFor(modelItem => item.Num)
                        }
                      
                    </td>
                   
                    <td  align="center">
                        @Html.DisplayFor(modelItem => item.DisAmount)
                    </td> 
                </tr>
            }
        }
    </table>
    
</div>